package Test2;

public class Frog extends Animal{
    Swim swim;

    public Frog(String name, String color, String type, Swim swim) {
        super(name, color, type);
        this.swim = swim;
    }

    @Override
    public void eat() {
        System.out.println("青蛙是"+super.getType()+",爱吃昆虫");
    }

    @Override
    public void call() {
        System.out.println("那只"+super.getColor()+"的,名叫"+super.getName()+"的青蛙正在呱呱的叫");
    }
}
